package org.zachary.agent.domain.aggregate_model.user;

import jakarta.persistence.Embeddable;

import java.util.Objects;

@Embeddable
public class NickName {
    private String nickName;
    public NickName() {}
    public NickName(String value) {
        this.nickName = value;
    }
    public String getValue() {
        return nickName;
    }
    public String toString() {
        return nickName;
    }
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NickName n = (NickName) o;
        return Objects.equals(nickName,n.nickName);
    }
    public int hashCode() {
        return Objects.hash(nickName);
    }
}
